package com.runoob.java;

public class OverLoading {
    public int test() {
        System.out.println("test1");
        return 1;
    }

    public void test(int a) {
        System.out.println("test2");
    }

    public String test(int a, String s) {
        System.out.println("test3");
        return a + "" + s;
    }

    public String test(String s, int a) {
        System.out.println("test4");
        return a + "" + s;
    }

    /**
     * 方法重载 Overload
     * @param args
     */
    public static void main(String[] args) {
        OverLoading o = new OverLoading();
        o.test();
        o.test(1);
        o.test(2, "ss");
        o.test("RR", 3);
    }
}
